<script setup lang="ts">
import { useRoute } from 'vue-router'
import { ref } from 'vue'
import axios from 'axios'
const route = useRoute()
const id = route.params.id
const src = ref('')
const _getDetail = async () => {
  const resp = await axios.get('/api/product/' + id)
  const data = resp.data.data[0]
  src.value = JSON.parse(data.productData).src
}
_getDetail()
</script>

<template>
  <div>
    <img :src="src" alt="" style="width: 100vw; height: 100vh" />
  </div>
</template>
